[mirrors]
http://mdocml.bsd.lv/snapshots/mdocml-1.13.3.tar.gz

[vars]
filesize=358971
sha512=a3b7304e313b905b3575d79eb7ac861723e0ef3f700199c136abe4d4c698929e99ee0789bfc6e591224fb0006c709afe0e4c1bb578605a767c371ec7dee26024
desc="manpage viewer. recommended to use instead of sabotage's minimal man prog"

[deps]

[build]
sed -i 's@pager = "/usr/bin/more -s"@pager = "/bin/less -s"@' main.c

cat << EOF > configure.local
PREFIX=$butch_prefix
MANDIR="$butch_prefix"/share/man
LIBDIR="$butch_prefix"/lib
CFLAGS="$optcflags"
BUILD_DB=0
HAVE_DIRENT_NAMLEN=0
HAVE_FGETLN=1
HAVE_FTS=0
HAVE_GETSUBOPT=1
HAVE_MMAP=1
HAVE_STRCASESTR=1
HAVE_STRLCAT=1
HAVE_STRLCPY=1
HAVE_STRPTIME=1
HAVE_STRSEP=1
HAVE_WCHAR=1
EOF

./configure -C --disable-nls $xconfflags

make V=1 -j$MAKE_THREADS LDFLAGS="$optldflags"
make DESTDIR="$butch_install_dir" install

dest="$butch_install_dir""$butch_prefix"
rm "$dest"/bin/man
chmod 0755 "$dest"/bin/mandoc
chmod 0755 "$dest"/bin/demandoc
ln -sf mandoc "$dest"/bin/man
